﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _4.PersonTask.Model
{
    class Person
    {
        public string Name { get; set; }
        public int? Age { get; set; }

        public override string ToString()
        {
            string age = "Not specified";
            if(this.Age != null)
            {
                age = this.Age.Value.ToString();
            }

            return String.Format("[Name - {0}, Age - {1}]", this.Name, age);
        }

        public Person(string name, int age)
        {
            this.Name = name;
            this.Age = age;
        }

        public Person(string name)
        {
            this.Name = name;
        }
    }
}
